#include "ExMainHUD.h"
#include "ExLevel.h"
#include <QDebug>

ExMainHUD::ExMainHUD(QWidget *parent)
	: QMainWindow(parent)
{
	ui.setupUi(this);

	MainLevel = new ExLevel(ui.CentralWidget, QRect(100, 0, ui.CentralWidget->width() - 100, ui.CentralWidget->height()));
}

void ExMainHUD::resizeEvent(QResizeEvent *event)
{
	QMainWindow::resizeEvent(event);

	MainLevel->OnResize(QRect(100, 0, ui.CentralWidget->width() - 100, ui.CentralWidget->height()));
}

void ExMainHUD::closeEvent(QCloseEvent *event)
{
	QMainWindow::closeEvent(event);

	delete MainLevel;
	MainLevel = nullptr;
}
